sudo yum install -y epel-release
sudo yum install -y tesseract-langpack-eng tesseract-langpack-chi-sim
sudo yum groupinstall "Development Tools" -y
sudo yum install -y leptonica-devel
sudo yum install -y autoconf automake libtool
sudo yum install -y pkgconfig
sudo yum install -y gcc gcc-c++
sudo yum install -y zlib-devel
sudo yum install -y libjpeg-turbo-devel
sudo yum install -y libpng-devel
sudo yum install -y libtiff-devel
sudo yum install -y giflib-devel
#sudo yum install -y tesseract

git clone https://github.com/tesseract-ocr/tesseract.git
cd tesseract

./autogen.sh
./configure
make
sudo make install
sudo ldconfig

wget https://github.com/tesseract-ocr/tessdata/raw/main/chi_sim.traineddata
wget https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata
sudo mv chi_sim.traineddata /usr/local/share/tessdata/
sudo mv eng.traineddata /usr/local/share/tessdata/

tesseract --version

tesseract test_image.png output -l chi_sim
